import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
const Login = ()=>import('@/views/Login.vue')
Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta:{
      requireLogin:false
    }
  },
  {
    path: '/profile',
    name: 'Profile',
    component: () => import('views/Profile.vue'),
    meta:{
      requireLogin:true
    }
  },
    {
      path: '/login',
      name: 'Login',
      component: Login,
      meta:{
        requireLogin:false
      }
    }
]

const router = new VueRouter({
  routes
})

export default router
